using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FiltronASP.Modules.Abstracts;
using FiltronASP.Helpers.Translations;

namespace FiltronASP.Modules
{
    public class contactModule : AbstractModule
    {
        private string htmlToReturn = String.Empty;
        private int languageId;

        public override string GenerateContent(FiltronASP.Models.Page page) {
            this.languageId = Convert.ToInt32(page.language_id);

            this.htmlToReturn += "<div style=\"margin-top: 15px; font-size: 11px;\" class=\"contentRightContainer contentRightBordered\">";
            this.htmlToReturn += translationHelper.getTranslation("_cntInfo", this.languageId);
            this.htmlToReturn += "</div>";
            this.htmlToReturn += "<h3>" + translationHelper.getTranslation("_cntHeader", this.languageId) + ":</h3>";
            this.htmlToReturn += "<div>";
            this.htmlToReturn += "<div id=\"beforeSend\">";
            this.htmlToReturn += "<form method=\"POST\" action=\"\" id=\"contactForm\">";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <label for=\"contactRelatesTo\">" + translationHelper.getTranslation("_cntSubject", this.languageId) + ":</label>";
            this.htmlToReturn += "        <select id=\"cntSubject\" name=\"relatesTo\">";
            this.htmlToReturn += "            <option value=\"" + translationHelper.getTranslation("_cntQuality", this.languageId) + "\">" + translationHelper.getTranslation("_cntQuality", this.languageId) + "</option>";
            this.htmlToReturn += "            <option value=\"" + translationHelper.getTranslation("_cntSales", this.languageId) + "\">" + translationHelper.getTranslation("_cntSales", this.languageId) + "</option>";
            this.htmlToReturn += "            <option value=\"" + translationHelper.getTranslation("_cntMarketing", this.languageId) + "\">" + translationHelper.getTranslation("_cntMarketing", this.languageId) + "</option>";
            this.htmlToReturn += "            <option value=\"" + translationHelper.getTranslation("_cntProducts", this.languageId) + "\">" + translationHelper.getTranslation("_cntProducts", this.languageId) + "</option>";
            this.htmlToReturn += "            <option value=\"" + translationHelper.getTranslation("_cntOther", this.languageId) + "\">" + translationHelper.getTranslation("_cntOther", this.languageId) + "</option>";
		    this.htmlToReturn += "        </select>";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <label for=\"cntName\">" + translationHelper.getTranslation("_cntName", this.languageId) + "</label>";
            this.htmlToReturn += "        <input type=\"text\" id=\"cntName\" name=\"name\" />";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <label for=\"cntEmail\">*" + translationHelper.getTranslation("_cntEmail", this.languageId) + "</label>";
            this.htmlToReturn += "        <input type=\"text\" id=\"cntEmail\" name=\"email\" />";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <label for=\"cntAddress\">*" + translationHelper.getTranslation("_cntAddress", this.languageId) + "</label>";
            this.htmlToReturn += "        <input type=\"text\" id=\"cntAddress\" name=\"address\" />";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <label for=\"cntCity\">*" + translationHelper.getTranslation("_cntCity", this.languageId) + "</label>";
            this.htmlToReturn += "        <input type=\"text\" id=\"cntCity\" name=\"city\" />";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <label for=\"cntZipCode\">*" + translationHelper.getTranslation("_cntZip", this.languageId) + "</label>";
            this.htmlToReturn += "        <input type=\"text\" class=\"zipCodeFirst\" id=\"contactZipCodeFirst\" name=\"zipcodeFirst\" /> <span class=\"zipCodeDash\">-</span> <input type=\"text\" class=\"zipCodeSecond\" id=\"contactZipCodeSecond\" name=\"zipcodeSecond\" />";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <label for=\"cntCountry\">*" + translationHelper.getTranslation("_cntCountry", this.languageId) + "</label>";
            this.htmlToReturn += "        <input type=\"text\" id=\"cntCountry\" name=\"country\" />";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <label for=\"cntPhone\">*" + translationHelper.getTranslation("_cntPhone", this.languageId) + "</label>";
            this.htmlToReturn += "        <input type=\"text\" id=\"cntPhone\" name=\"phone\" />";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <label for=\"cntQuestion\">" + translationHelper.getTranslation("_cntQuestion", this.languageId) + ":</label>";
            this.htmlToReturn += "        <textarea id=\"cntQuestion\" cols=\"0\" rows=\"0\"></textarea>";
            this.htmlToReturn += "        <span class=\"formInfo\">* " + translationHelper.getTranslation("_cntReqFields", this.languageId) + "</span>";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "    <div class=\"contactFormSingle\">";
            this.htmlToReturn += "        <input onclick=\"submitFormMail(); return false;\" type=\"submit\" name=\"send\" value=\"" + translationHelper.getTranslation("_cntSubmit", this.languageId) + "\">";
            this.htmlToReturn += "    </div>";
            this.htmlToReturn += "</div>";
            this.htmlToReturn += "<div style=\"display: none;\" id=\"afterSend\">";
            this.htmlToReturn += "<span style=\"display: block; padding: 10px; margin: 10px; border: 1px #363333 dashed;\">" + translationHelper.getTranslation("_cntAfterSend", this.languageId) + "</span>";
            this.htmlToReturn += "</div>";
            this.htmlToReturn += "</form>";

            return this.htmlToReturn;
        }
    }
}
